package com.siwei.mes.entity.mixproportion;

import cn.dev33.satoken.stp.StpUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;


/**
 * 配合比验证记录(MixProportionVerifyRecord)实体类
 *
 * @author makejava
 * @since 2024-11-22 23:01:53
 */
@Data
@Accessors(chain = true)
@Table(name = "pk_mix_proportion_verify_record")
@ApiModel(value = "MixProportionVerifyRecord", description = "配合比验证记录")
public class MixProportionVerifyRecord implements Serializable {
    private static final long serialVersionUID = 134319402475599564L;
    /**
     * 主键id
     */
    @Id
    @ApiModelProperty(value = "配合比验证记录主键ID", name = "id")
    private Long id;
    /**
     * 配合比id
     */
    @Column(name = "mix_id")
    @ApiModelProperty(value = "配合比id", name = "mixId")
    private Long mixId;
    /**
     * 工程id  erp_project表的id
     */
    @Column(name = "project_id")
    @ApiModelProperty(value = "工程id  erp_project表的id", name = "projectId")
    private Long projectId;
    /**
     * 工程名称
     */
    @Column(name = "project_name")
    @ApiModelProperty(value = "工程名称", name = "projectName")
    private String projectName;
    /**
     * 合同编号
     */
    @Column(name = "contract_no")
    @ApiModelProperty(value = "合同编号", name = "contractNo")
    private String contractNo;
    /**
     * 水泥厂家
     */
    @Column(name = "sn_factory")
    @ApiModelProperty(value = "水泥厂家", name = "snFactory")
    private String snFactory;
    /**
     * 粗骨料厂家
     */
    @Column(name = "cgl_factory")
    @ApiModelProperty(value = "粗骨料厂家", name = "cglFactory")
    private String cglFactory;
    /**
     * 细骨料厂家
     */
    @Column(name = "xgl_factory")
    @ApiModelProperty(value = "细骨料厂家", name = "xglFactory")
    private String xglFactory;
    /**
     * 粉煤灰1厂家
     */
    @Column(name = "fmh1_factory")
    @ApiModelProperty(value = "粉煤灰1厂家", name = "fmh1Factory")
    private String fmh1Factory;
    /**
     * 矿渣粉1厂家
     */
    @Column(name = "kzf1_factory")
    @ApiModelProperty(value = "矿渣粉1厂家", name = "kzf1Factory")
    private String kzf1Factory;
    /**
     * 外加剂1厂家
     */
    @Column(name = "wjj1_factory")
    @ApiModelProperty(value = "外加剂1厂家", name = "wjj1Factory")
    private String wjj1Factory;
    /**
     * 外加剂2厂家
     */
    @Column(name = "wjj2_factory")
    @ApiModelProperty(value = "外加剂2厂家", name = "wjj2Factory")
    private String wjj2Factory;
    /**
     * 外参料1厂家
     */
    @Column(name = "wcl1_factory")
    @ApiModelProperty(value = "外参料1厂家", name = "wcl1Factory")
    private String wcl1Factory;
    /**
     * 外参料2厂家
     */
    @Column(name = "wcl2_factory")
    @ApiModelProperty(value = "外参料2厂家", name = "wcl2Factory")
    private String wcl2Factory;
    /**
     * 水泥厂家
     */
    @Column(name = "sn_factory_called")
    @ApiModelProperty(value = "水泥厂家简称", name = "snFactoryCalled")
    private String snFactoryCalled;
    /**
     * 粗骨料厂家简称
     */
    @Column(name = "cgl_factory_called")
    @ApiModelProperty(value = "粗骨料厂家简称", name = "cglFactoryCalled")
    private String cglFactoryCalled;
    /**
     * 细骨料厂家简称
     */
    @Column(name = "xgl_factory_called")
    @ApiModelProperty(value = "细骨料厂家简称", name = "xglFactoryCalled")
    private String xglFactoryCalled;
    /**
     * 粉煤灰厂家简称
     */
    @Column(name = "fmh1_factory_called")
    @ApiModelProperty(value = "粉煤灰1厂家简称", name = "fmh1FactoryCalled")
    private String fmh1FactoryCalled;
    /**
     * 矿渣粉厂家简称
     */
    @Column(name = "kzf1_factory_called")
    @ApiModelProperty(value = "矿渣粉1厂家简称", name = "kzf1FactoryCalled")
    private String kzf1FactoryCalled;
    /**
     * 外加剂1厂家简称
     */
    @Column(name = "wjj1_factory_called")
    @ApiModelProperty(value = "外加剂1厂家简称", name = "wjj1FactoryCalled")
    private String wjj1FactoryCalled;
    /**
     * 外加剂2厂家简称
     */
    @Column(name = "wjj2_factory_called")
    @ApiModelProperty(value = "外加剂2厂家简称", name = "wjj2FactoryCalled")
    private String wjj2FactoryCalled;
    /**
     * 外参料1厂家简称
     */
    @Column(name = "wcl1_factory_called")
    @ApiModelProperty(value = "外参料1厂家简称", name = "wcl1FactoryCalled")
    private String wcl1FactoryCalled;
    /**
     * 外参料2厂家简称
     */
    @Column(name = "wcl2_factory_called")
    @ApiModelProperty(value = "外参料2厂家简称", name = "wcl2FactoryCalled")
    private String wcl2FactoryCalled;
    /**
     * 水泥供应商
     */
    @Column(name = "sn_supplier")
    @ApiModelProperty(value = "水泥供应商", name = "snSupplier")
    private String snSupplier;
    /**
     * 粗骨料供应商
     */
    @Column(name = "cgl_supplier")
    @ApiModelProperty(value = "粗骨料供应商", name = "cglSupplier")
    private String cglSupplier;
    /**
     * 细骨料供应商
     */
    @Column(name = "xgl_supplier")
    @ApiModelProperty(value = "细骨料供应商", name = "xglSupplier")
    private String xglSupplier;
    /**
     * 粉煤灰1供应商
     */
    @Column(name = "fmh1_supplier")
    @ApiModelProperty(value = "粉煤灰1供应商", name = "fmh1Supplier")
    private String fmh1Supplier;
    /**
     * 矿渣粉1供应商
     */
    @Column(name = "kzf1_supplier")
    @ApiModelProperty(value = "矿渣粉1供应商", name = "kzf1Supplier")
    private String kzf1Supplier;
    /**
     * 外加剂1供应商
     */
    @Column(name = "wjj1_supplier")
    @ApiModelProperty(value = "外加剂1供应商", name = "wjj1Supplier")
    private String wjj1Supplier;
    /**
     * 外加剂2供应商
     */
    @Column(name = "wjj2_supplier")
    @ApiModelProperty(value = "外加剂2供应商", name = "wjj2Supplier")
    private String wjj2Supplier;
    /**
     * 外参料1供应商
     */
    @Column(name = "wcl1_supplier")
    @ApiModelProperty(value = "外参料1供应商", name = "wcl1Supplier")
    private String wcl1Supplier;
    /**
     * 外参料2供应商
     */
    @Column(name = "wcl2_supplier")
    @ApiModelProperty(value = "外参料2供应商", name = "wcl2Supplier")
    private String wcl2Supplier;
    /**
     * 水泥供应商
     */
    @Column(name = "sn_supplier_called")
    @ApiModelProperty(value = "水泥供应商简称", name = "snSupplierCalled")
    private String snSupplierCalled;
    /**
     * 粗骨料供应商简称
     */
    @Column(name = "cgl_supplier_called")
    @ApiModelProperty(value = "粗骨料供应商简称", name = "cglSupplierCalled")
    private String cglSupplierCalled;
    /**
     * 细骨料供应商简称
     */
    @Column(name = "xgl_supplier_called")
    @ApiModelProperty(value = "细骨料供应商简称", name = "xglSupplierCalled")
    private String xglSupplierCalled;
    /**
     * 粉煤灰供应商简称
     */
    @Column(name = "fmh1_supplier_called")
    @ApiModelProperty(value = "粉煤灰1供应商简称", name = "fmh1SupplierCalled")
    private String fmh1SupplierCalled;
    /**
     * 矿渣粉供应商简称
     */
    @Column(name = "kzf1_supplier_called")
    @ApiModelProperty(value = "矿渣粉1供应商简称", name = "kzf1SupplierCalled")
    private String kzf1SupplierCalled;
    /**
     * 外加剂1供应商简称
     */
    @Column(name = "wjj1_supplier_called")
    @ApiModelProperty(value = "外加剂1供应商简称", name = "wjj1SupplierCalled")
    private String wjj1SupplierCalled;
    /**
     * 外加剂2供应商简称
     */
    @Column(name = "wjj2_supplier_called")
    @ApiModelProperty(value = "外加剂2供应商简称", name = "wjj2SupplierCalled")
    private String wjj2SupplierCalled;
    /**
     * 外参料1供应商简称
     */
    @Column(name = "wcl1_supplier_called")
    @ApiModelProperty(value = "外参料1供应商简称", name = "wcl1SupplierCalled")
    private String wcl1SupplierCalled;
    /**
     * 外参料2供应商简称
     */
    @Column(name = "wcl2_supplier_called")
    @ApiModelProperty(value = "外参料2供应商简称", name = "wcl2SupplierCalled")
    private String wcl2SupplierCalled;

    /**
     * 创建人
     */
    @Column(name = "creater")
    @ApiModelProperty(value = "创建人", name = "creater")
    private Long creater;
    /**
     * 创建时间
     */
    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间", name = "createTime")
    private Date createTime;
    /**
     * 修改人
     */
    @Column(name = "updater")
    @ApiModelProperty(value = "修改人", name = "updater")
    private Long updater;
    /**
     * 更新时间
     */
    @Column(name = "update_time")
    @ApiModelProperty(value = "更新时间", name = "updateTime")
    private Date updateTime;
    /**
     * 是否删除  1-删除  0-正常
     */
    @Column(name = "is_del")
    @ApiModelProperty(value = "是否删除  1-删除  0-正常", name = "isDel")
    private Integer isDel;

    public MixProportionVerifyRecord init(boolean isCreate) {
        this.setUpdater(StpUtil.isLogin() ? StpUtil.getLoginIdAsLong() : null)
                .setUpdateTime(new Date());
        if (isCreate) {
            this.setCreater(StpUtil.isLogin() ? StpUtil.getLoginIdAsLong() : null)
                    .setCreateTime(new Date())
                    .setIsDel(0);
        }
        return this;
    }
}
